package com.cooperate.fly.service.system;

import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.Properties;


/**
 * 全局静态变量
 *
 */
public class Constant {
	
	public static String getSystemAdminName(){
		Properties pps=new Properties();
		try {
			InputStream in=new BufferedInputStream(new FileInputStream("src/main/resources/conf/local/user.properties"));
			pps.load(in);
			String name=pps.getProperty("SystemAdminName");
			return name;
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}
	}
	
	public static String getSystemAdminPwd(){
		Properties pps=new Properties();
		try {
			InputStream in=new BufferedInputStream(new FileInputStream("src/main/resources/conf/local/user.properties"));
			pps.load(in);
			String pwd=pps.getProperty("SystemAdminPassword");
			return pwd;
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}
	}
	
	/*public static void main(String[] args){
		System.out.println(Constant.getSystemAdminName()+Constant.getSystemAdminPwd());
	}*/
	
	public final static String USER_SESSION_KEY="currentUser";
	
	/**
	 * 系统默认密码
	 */
	public final static String DEFAULT_USER_PASSWORD="123456";
	
	public final static int DAY_MSECS = 1000*60*60*24;

	
}
